{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Introduction to Mayavi\n",
    "\n",
    "**Prabhu Ramachandran**\n",
    "\n",
    "**Department of Aerospace Engineering, IIT Bombay**\n",
    "<br/>\n",
    "\n",
    "**The STFC Data Intensive, AI and ML Summer School 2019**\n",
    "\n",
    "**Sussex University, UK, July 2019**\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Material\n",
    "\n",
    "<br/>\n",
    "<br/>\n",
    "<br/>\n",
    "<br/>\n",
    "\n",
    "<center>\n",
    "<a href=\"https://github.com/prabhuramachandran/mayavi-tutorial\">\n",
    "github.com/prabhuramachandran/mayavi-tutorial</a>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Outline\n",
    "\n",
    "- What is Mayavi?\n",
    "- What can it do for you?\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "\n",
    "<center>\n",
    "<img width=\"90%\" src=\"MEDIA/m2/m2_app3_3.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "<center>\n",
    "<img width=\"90%\" src=\"MEDIA/m2/ipython_mayavi.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "<center>\n",
    "<img width=\"90%\" src=\"MEDIA/m2/lorenz_ui1.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "<center>\n",
    "<img width=\"90%\" src=\"MEDIA/m2/m2_envisage.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "<center>\n",
    "<img width=\"90%\" src=\"MEDIA/m2/mayavi_jupyter.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## History\n",
    "\n",
    "- Mayavi-1.0 released in 2001\n",
    "- Rewritten to use ETS in 2004-2005\n",
    "- Gael Varoquaux: 2007 - 2012\n",
    "- Contributions from Deepak Surti and other Enthought developers\n",
    "- Many other contributors through PRs\n",
    "- Support from Enthought over the years\n",
    "- IIT Bombay supports with an academic environment\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Information\n",
    "\n",
    "- Old package: around for > 15 years\n",
    "- Seamless NumPy integration\n",
    "- Fully scriptable\n",
    "- Can be used with a GUI\n",
    "- https://github.com/enthought/mayavi\n",
    "- Uses VTK (http://www.vtk.org)\n",
    "- Provides a GUI for VTK\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Visualization features\n",
    "\n",
    "- Supports a variety of datasets\n",
    "- Polygonal data, structured grids, unstructured grids\n",
    "- Many visualization algorithms\n",
    "- Scalar, vector, and tensor visualization\n",
    "- Volume rendering\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Other features\n",
    "\n",
    "* Automatic script recording\n",
    "* wxPython and Qt/PySide support\n",
    "* Powerful command line options\n",
    "* Off-screen support\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Overview of architecture\n",
    "<center>\n",
    "<img width=\"80%\" height=\"80%\" src=\"MEDIA/m2/layers.png\"/>\n",
    "</center>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## What next?\n",
    "\n",
    "- Get started with `mlab`\n",
    "- Simple animation\n",
    "- Understanding the mayavi pipeline\n",
    "- Making your own datasets\n",
    "- Learning the filters and modules by example\n"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "Slideshow",
  "language": "python",
  "livereveal": {
   "controls": true,
   "help": true,
   "scroll": true,
   "slideNumber": true,
   "transition": "none"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
